package com.sinothk.fc.goodsStock.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sinothk.fc.goodsStock.entity.GoodsStockClassifyVO;
import com.sinothk.fc.goodsStock.entity.GoodsStockEntity;
import com.sinothk.fc.goodsStock.entity.GoodsStockSearchReq;
import com.sinothk.fc.goodsStockRecord.entity.GoodsStockRecordEntity;

import java.util.ArrayList;

/**
 * @Description: 库存信息
 * @Author: Liangyt
 * @Date:   2022-07-30
 * @Version: V1.0
 */
public interface IGoodsStockService extends IService<GoodsStockEntity> {

    IPage<GoodsStockEntity> storeGoodsStockPage(Page<GoodsStockEntity> page, GoodsStockEntity goodsStockEntity) throws Exception;

    GoodsStockEntity addOrEdit(GoodsStockEntity goodsStockEntity);

    IPage<GoodsStockClassifyVO> listForClassify(Page<GoodsStockEntity> page, GoodsStockSearchReq searchReq) throws Exception;

    IPage<GoodsStockEntity> listForBarCode(Page<GoodsStockEntity> objectPage, GoodsStockSearchReq searchReq) throws Exception;

    GoodsStockClassifyVO getStockAllNumByBarcode(String storeId, String barcode);

    void deleteBathStockForBarcode(String barcode) throws Exception;

    GoodsStockEntity getStockTotalInfoForBarcode(String barcode) throws Exception;

    GoodsStockRecordEntity addStockNum(GoodsStockEntity beanReq);

    ArrayList<GoodsStockRecordEntity> addBatch(ArrayList<GoodsStockEntity> stockList);
}
